#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
    int fd[2];

    int ret = pipe(fd);
    if(-1 == ret) {
        perror("pipr error");
        exit(1);
    }

    printf("pipe[0] = %d\n", fd[0]);
    printf("pipe[1] = %d\n", fd[1]);

    close(fd[0]);
    close(fd[1]);

    return 0;
}

